import React,{useEffect} from 'react'
import { Carousel, WingBlank } from 'antd-mobile';
import './mine.css'
export default function Banner(props) {
    let initState={
        dataArr:[]
    }
    useEffect(() => {
        setTimeout(() => {
            initState.dataArr=props.data
        }, 500);
    }, [initState.dataArr])
    return (
        <div>
            <WingBlank>
                <Carousel
                    autoplay={true}
                    infinite
                >
                    {initState.dataArr.map(val => (
                        <img
                            src={val.img}
                            alt=""
                            key={val.id}
                            style={{ width: '100%', verticalAlign: 'top', height: "2rem" }}

                        />
                    ))}
                </Carousel>
            </WingBlank>
        </div>
    )
}
